#include "jtreewidget.h"
#include <QHeaderView>
#include <QLabel>

namespace QTE
{

JTreeWidget::JTreeWidget(QWidget *parent) :
	QTreeWidget(parent),
	JItemContainer(this)
{
	header()->setSectionResizeMode(QHeaderView::Stretch);
}

JTreeWidget::~JTreeWidget()
{

}

void JTreeWidget::setMessageLabelMode(MsgLabelMode mode)
{
	JItemContainer::setMessageLabelMode(mode);

	if( mode == Auto )
		messageLabel()->setVisible(model()->rowCount() == 0);
}

} //namespace QTE
